package edu.ccut.saturn.component;

import java.io.Serializable;
import java.util.Collection;
import java.util.Set;

/**
 * 记录了bundle中的可执行组件的信息。
 * 
 * <p>
 * There are three executable component type in a bundle. include:
 * <li>1. base component define in /** /*.component
 * <li>2. logic component define in /** /*.logic
 * <li>3. action component define in /** /*.action
 * 
 * @author 谷钰
 * 
 * @version 1.0 2008.9.04
 */
public interface IBundleComponentInfo extends Serializable{
	
	/**
	 * Get bundle symbolic name
	 * 
	 * @return
	 */
	public String getBundleSymbolicName();
	
	/**
	 * Get all component information in this bundle
	 * 
	 * @return
	 */
	public Collection<IComponentInfo> getComponentInfos();

	/**
	 * Get all component key set
	 * 
	 * @return
	 */
	public Set<String> getComponentKeys();

	/**
	 * Get component information by component key
	 * 
	 * @param componentKey
	 * @return
	 */
	public IComponentInfo getComponentInfo(String componentKey);

	/**
	 * Add a component information
	 * 
	 * @param componentInfo
	 * @throws SaturnComponentException
	 */
	public void addComponentInfo(IComponentInfo componentInfo)
			throws SaturnComponentException;

	/**
	 * Add component information List
	 * 
	 * @param componentInfos
	 * @throws SaturnComponentException
	 */
	public void addComponentInfos(Collection<IComponentInfo> componentInfos)
			throws SaturnComponentException;
}
